#ifndef MEASUREPAGECHARTS_H
#define MEASUREPAGECHARTS_H
#include <QtCharts>
#include "qchart.h"
#include <QtCharts/QChartView>
#include <QtCharts/QPieSeries>
#include <QtCharts/QPieSlice>
#include <QtCharts/QAbstractBarSeries>
#include <QtCharts/QPercentBarSeries>
#include <QtCharts/QStackedBarSeries>
#include <QtCharts/QBarSeries>
#include <QtCharts/QBarSet>
#include <QtCharts/QLineSeries>
#include <QtCharts/QSplineSeries>
#include <QtCharts/QScatterSeries>
#include <QtCharts/QAreaSeries>
#include <QtCharts/QLegend>
#include <QtCharts/QBarCategoryAxis>
#include <QtCharts/QValueAxis>
#include <QtCharts/QChartGlobal>

class MeasurePageCharts
{
public:
    QLineSeries *Series_PPG1,*Series_PPG2;
    QLineSeries *Series_APPG1,*Series_APPG2;

    MeasurePageCharts();
    ~MeasurePageCharts();
    void InitialAxis_Chart_PPG1();
    QChart *CreateLineChart_PPG1();
    void Update_PPGData1(double ppgData);

    void InitialAxis_Chart_PPG2();
    QChart *CreateLineChart_PPG2();
    void Update_PPGData2(double ppgData);

    void InitialAxis_Chart_APPG1();
    QChart *CreateLineChart_APPG1();
    void Update_APPGData1(double appgData);

    void InitialAxis_Chart_APPG2();
    QChart *CreateLineChart_APPG2();
    void Update_APPGData2(double appgData);

    void InitialAxis_Chart_HRV1();
    QChart *CreateHRVHistBarChart();
    void Update_HRVHistBarData(int pos,int RR);

    void InitialAxis_Chart_HRV2();
    QChart *CreateHRVHistBarChart2();
    void Update_HRVHistBarData2(int pos,int RR);

private:
    int LineChartLen_X;
    int HRVBarNum;
    int barNumLoop;

    QColor *Chart_Y_Axis_Line_Color;//y轴Axis颜色
    QFont *Font_Chart_LabelsFont,*Font_Chart_TitleFont;
    QValueAxis *xAxis_PPG1 ,*xAxis_PPG2;
    QValueAxis *yAxis_PPG1,*yAxis_PPG2;
    QValueAxis *xAxis_APPG1,*xAxis_APPG2;
    QValueAxis *yAxis_APPG1,*yAxis_APPG2;
    QValueAxis *xAxis_HRV1,*xAxis_HRV2;
    QValueAxis *yAxis_HRV1,*yAxis_HRV2;
    int ppg1_flag,ppg2_flag,app1_flag,appg2_flag;
    QBarSet *HRVHist_BarSet,*HRVHist_BarSet2;


};

#endif // MEASUREPAGECHARTS_H
